﻿@model WaiGaoQiaoWeb.Models.CardModifyVM
@{
    ViewBag.Title = "ModifyCard";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Head
{
    @Html.Css("EditForm")
    @Html.Js("datepicker")
    @Html.Css("dp")
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("#ExpiredTime").datepicker({ picker: "<img class='picker' align='middle' src='Images/icons/s.gif' alt=''/>" });
            $("form").makeValidationInline();
            //保存
            $("#btnSave").click(function (event) {
                if (!$("#fmEdit").valid()) {
                    return false;
                }
                $('#fmEdit').ajaxSubmit(function (callback) {
                    if (callback) {
                        CloseModelWindow(null, true);
                    }
                });
            });
            //关闭
            $("#btnCancel").click(function (e) {
                CloseModelWindow(null, false);
            });
        });              // end of document        
    </script>
}
@using (Html.BeginForm("SaveCard", "CardModify", FormMethod.Post, new { id = "fmEdit" }))
{
    @Html.ValidationSummary(true)
    <div id="editFormWrapper">
        @Html.HiddenFor(model => model.PName)
        @Html.HiddenFor(model => model.EmpNoHidden)
        <fieldset>
            <legend>人员信息</legend>
            <div class="editFormItems">
                <div class="editFormLabel">
                    @Html.LabelFor(model => model.PName)
                </div>
                <div class="editForm">
                    @Html.TextBoxFor(model => model.PName, new { @readonly = true, disabled = "disabled" })
                </div>
            </div>
            <div class="editFormItems">
                <div class="editFormLabel">
                    @Html.LabelFor(model => model.EmpNo)
                </div>
                <div class="editForm">
                    @Html.TextBoxFor(model => model.EmpNo, new { @readonly = true, disabled = "disabled" })
                </div>
            </div>
            <div class="editFormItems">
                <div class="editFormLabel">
                    @Html.LabelFor(model => model.deptName)
                </div>
                <div class="editForm">
                    @Html.TextBoxFor(model => model.deptName, new { @readonly = true, disabled = "disabled" })
                </div>
            </div>
            <div class="editFormItems">
                <div class="editFormLabel">
                    @Html.LabelFor(model => model.PersonTypeName)
                </div>
                <div class="editForm">
                    @Html.TextBoxFor(model => model.PersonTypeName, new { @readonly = true, disabled = "disabled" })
                </div>
            </div>
            <div class="editFormItems">
                <div class="editFormLabel">
                    @Html.LabelFor(model => model.CardSerial)
                </div>
                <div class="editForm">
                    @Html.TextBoxFor(model => model.CardSerial, new { @readonly = true, disabled = "disabled" })
                </div>
            </div>
            <div class="editFormItems">
                <div class="editFormLabel">
                    @Html.LabelFor(model => model.CardStatus)
                </div>
                <div class="editForm">
                    @Html.TextBoxFor(model => model.CardStatus, new { @readonly = true, disabled = "disabled" })
                </div>
            </div>
            <div class="editFormItems">
                <div class="editFormLabel">
                    @Html.LabelFor(model => model.WorkStatus)
                </div>
                <div class="editForm">
                    @Html.TextBoxFor(model => model.WorkStatus, new { @readonly = true, disabled = "disabled" })
                </div>
            </div>
            <div class="editFormItems">
                <div class="editFormLabel">
                    @Html.LabelFor(model => model.Balance)
                </div>
                <div class="editForm">
                    @Html.TextBoxFor(model => model.Balance, new { @readonly = true, disabled = "disabled" })
                </div>
            </div>
        </fieldset>
        <fieldset>
            <legend>改卡信息</legend>
            <div class="editFormItems">
                <div class="editFormLabel">
                    @Html.LabelFor(model => model.ExpiredTime)
                </div>
                <div class="editForm">
                    @Html.TextBoxFor(model => model.ExpiredTime, new { @style = "width:120px;", @ReadOnly = true, @Pattern = "yyyy-MM-dd" })
                    @Html.ValidationMessageFor(model => model.ExpiredTime)
                </div>
            </div>
            <div class="editFormItems">
                <div class="editFormLabel">
                    @Html.LabelFor(model => model.CardOptDeposit)
                </div>
                <div class="editForm">
                    @Html.TextBoxFor(model => model.CardOptDeposit, new { Class = "uc" })
                    @Html.ValidationMessageFor(model => model.CardOptDeposit)
                </div>
            </div>
            <div class="editFormItems">
                <div class="editFormLabel">
                    补贴卡
                </div>
                <div class="editForm">
                    @Html.CheckBoxFor(model => model.blSubsidyCard)
                </div>
            </div>
        </fieldset>
    </div>
    <div class="buttonpanel">
        <div style="float: right; margin-right: 10px;">
            <a id="btnSave" href="javascript:void(0);" class="button"><span>保存</span></a> <a
                id="btnCancel" href="javascript:void(0);" class="button"><span>关闭</span></a>
        </div>
    </div>  
}